package com.demo2;

public class Test {
    public static void main(String[] args) {
        //创建对象
        Frog frog = new Frog("小绿", 1);
        System.out.println(frog.getName()+","+frog.getAge());
        frog.drink();
        frog.eat("虫子");
        System.out.println("=========");
        Dog dog = new Dog("旺财",5);
        System.out.println(dog.getName()+","+dog.getAge());
        dog.drink();
        dog.eat("骨头");
        System.out.println("=========");
        Sheep sheep = new Sheep("小白",3);
        System.out.println(sheep.getName()+","+sheep.getAge());
        sheep.drink();
        sheep.eat("草");
    }
}
